package com.pp.proposalPrint.shared;

public class Material extends ProposalContent{

	public Material(String name) {
		super(name);
	}

	// The number of units
	private float unit = 1;
	
	// The price of a unit
	private float unitPrice = 0;

	// Constructor
	public Material(String name, float unit, float unitPrice) {
		super(name);
		this.unit = unit;
		this.unitPrice = unitPrice;
	}

	// Returns the number of units
	public float getUnit() {
		return unit;
	}
	
	public void setUnit(float unit) {
		this.unit = unit;
	}
	
	public float getUnitPrice() {
		return unitPrice;
	}
	
	public void setUnitPrice(float unitPrice) {
		this.unitPrice = unitPrice;
	}
	
	// Returns the total price of this material
	@Override
	public float getTotal() {
		return this.unit*this.unitPrice;
	}
}
